<extend name="Layout:list" />
<block name="title"><title>列表</title></block>
<block name="subnav">
    <a class="btn red" href="__CONTROLLER__/add">添加页面</a>　<a class="btn red-stripe" href="__CONTROLLER__/index">页面管理</a>　<a class="btn" href="__CONTROLLER__/template">模板管理</a>
</block>
<block name="main">
    <form name="myform" action="" method="post">
        <div class="table-list">
            <table width="100%" cellspacing="0">
                <thead>
                    <tr>
                        <th width="16"><input type="checkbox" value="" id="check_box" onclick="selectall('ids[]');"></th>
                        <th width="40">ID</th>
                        <th>标题</th>
                        <th width="200">更新时间</th>
                        <th width="102">管理操作</th>
                    </tr>
                </thead>
                <tbody>
                    <?php foreach ($pages as $key => $value) { ?>
                    <tr>
                        <td align="center"><input class="inputcheckbox " name="ids[]" value="<?php echo $value['id']; ?>" type="checkbox"></td>
                        <td align="center"><?php echo $value['id']; ?></td>
                        <td><?php echo $value['title']; ?></td>
                        <td align="center"><?php echo $value['updatetime']; ?></td>
                        <td align="center">
                            <a href="__CONTROLLER__/edit?id=<?php echo $value['id']; ?>">修改</a> | <a href="__CONTROLLER__/delete?id=<?php echo $value['id']; ?>" onClick="return confirm('确认删除『 <?php echo addslashes($value['title']); ?> 』 吗？')">删除</a>
                        </td>
                    </tr>
                    <?php } ?>
                </tbody>
            </table>
            <div class="mt-20 clearfix">
                <a href="javascript:$('#check_box').click();">全选/取消</a>&nbsp; <input name="deletesubmit" type="submit" class="btn" value="删除" onclick="document.myform.action='__CONTROLLER__/delete';return confirm('确认要删除 『 选中 』 吗？')">
                <?php echo $page_html; ?>
                <div class="pull-right form-inline">
                <?php echo \Org\Util\Form::select(C('list_rows_select'), cookie('list_rows_select'), 'class="m-wrap small" name="list_rows_select" onchange="change_list_rows()"'); ?>
                </div>
            </div>
        </div>
    </form>
</block>